<template>
	<div class="user-center-index">
		<div class="container">
			<erp-left-class :classfiList='list'></erp-left-class>
			<div class="erp-right">
				<router-view></router-view>
			</div>
		</div>
	</div>
</template>

<script>
	import librarData from '@/api/mock-data/library-data'
	import ErpLeftClass from '@/components/erp-left-class'
	export default {
		components: {
			ErpLeftClass,
	    },
	    data () {
	    	return {
	    		list: [],
	    	}
	    },
	    
	    created(){
	    	if(this.$route.name == 'map-all'){
	    		this.list = librarData.myClassfiList;
	    	} else {
	    		this.list = librarData.diyClassfiList;
	    	}
	    },
	    methods: {
	    	
	    },
	    watch:{
		  	$route(to,from){
			    if(to.name == 'map-all'){
			    	this.list = librarData.myClassfiList;
			    } else {
			    	this.list = librarData.diyClassfiList;
			    }
		  	}
		},
	}
</script>

<style lang="less" scoped="scoped">
	.erp-right{
		float: right;
		width: calc(100% - 222px);
	}
</style>